package cn.weiyang.biz;

import cn.weiyang.dao.RecordDao;
import cn.weiyang.model.Record;

import java.util.List;

/**
 * Created by Administrator on 2017-7-15.
 */
public class RecordBizImpl implements RecordBiz {
    private RecordDao recordDao;
    /**
     * 根据交易号获取交易记录
     * @param record_id
     * @return
     */
    public Record get(long record_id) {
        return recordDao.get(record_id);
    }
    /**
     * 增加交易记录
     * @param record
     */
    public void addRecord(Record record) {
        recordDao.addRecord(record);
    }
    /**
     * 删除交易记录
     * @param record_id
     */
    public void delRecord(long record_id) {
        recordDao.delRecord(record_id);
    }
    /**
     * 查询所有交易记录
     * @param hql
     * @return
     */
    public List<Record> findAllRecord(String hql) {
        return recordDao.findAllRecord(hql);
    }

    public RecordDao getRecordDao() {
        return recordDao;
    }

    public void setRecordDao(RecordDao recordDao) {
        this.recordDao = recordDao;
    }
}
